package com.rainng.coursesystem.service;

import com.rainng.coursesystem.manager.OptionManager;
import com.rainng.coursesystem.model.vo.response.ResultVO;
import org.springframework.stereotype.Service;

@Service
public class OptionService extends BaseService {
    private final OptionManager manager;

    public OptionService(OptionManager manager) {
        this.manager = manager;
    }

    public ResultVO setAllowMemberSelect(Boolean status) {
        manager.setAllowMemberSelect(status);
        return result("成功");
    }

    public ResultVO getAllowMemberSelect() {
        return result(manager.getAllowMemberSelect());
    }

    public ResultVO setAllowLeaderBudget(Boolean status) {
        manager.setAllowLeaderBudget(status);
        return result("成功");
    }

    public ResultVO getAllowLeaderBudget() {
        return result(manager.getAllowLeaderBudget());
    }
}
